package br.edu.ufcg.greengrid.event.reader;

import br.edu.ufcg.greengrid.event.Event;
import br.edu.ufcg.greengrid.event.MachineIdToOperationsPerSecondEvent;

public class MachineIdToOperationsPerSecondEventReader extends EventReader<MachineIdToOperationsPerSecondEvent> {

	@Override
	protected MachineIdToOperationsPerSecondEvent getEvent(String line) {

		String[] split = line.split(Event.SEPARATOR);
		int index = 0;
		MachineIdToOperationsPerSecondEvent event = new MachineIdToOperationsPerSecondEvent(split[index++], Long
				.parseLong(split[index++]));

		return event;
	}

}
